
'use strict';
define(['app', 'utils/route-config'], function (app, routeConfig) {

    /**
	* Settings services
	*/
	app.factory("settingServices", function($http) {
		var configuration = undefined;
	
		return {
			initialize: function(callback) {
				console.log('get configuration');
				$http.post(app.serviceBase, { "service" : "getConfiguration"}).
				success(function(data, status) 
				{
					console.info("getConfiguration - call success"); 
					configuration = data.response;
					callback(data);
				})
				.
				error(function(data, status) 
				{
					alert(data);
					console.error("getConfiguration - call failed"); 	
					throw status + ' : ' + data;	
				});
			}
		};
	});

    return app;
});